#ifndef HTTP_HTTP_REQUEST_H_
#define HTTP_HTTP_REQUEST_H_

#include <fermat/http/http_message.h>
#include <fermat/http/http_method.h>
#include <memory>

namespace fermat {
namespace http {

    class Request : public Message {

    public:
        Request ();

    protected:
        Request ( Configure configure );
    public:

        virtual void clear ();
        virtual void resetBuffers ();

        const Method method () const;

        std::string methodName () const;

        bool upgrade () const;

        const std::string& url () const;
			
	private:
		std::string _url;

	private:
        static int on_url
            ( ::http_parser * parser, const char * data, size_t size );
    };

typedef std::shared_ptr<Request> RequestPtr;
}

}

#endif

